package com.cn.wanxi.autoconfig.controller;

import com.cn.wanxi.autoconfig.annotation.PermissionCheck;
import com.cn.wanxi.autoconfig.annotation.RequestLog;
import com.cn.wanxi.autoconfig.vo.ResultVO;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName UserController
 * @Description 用户的模块的controller
 * @Author JiJiang
 * @Date 2023/7/5 22:15
 * @Version 1.0
 */
@RestController
@RequestMapping("/user")
public class UserController {


    @RequestLog
    @PermissionCheck
    @GetMapping("/{id}")
    public ResultVO<Object> getDetailById(@PathVariable Long id) {

        int a = 1 / 0;
        return ResultVO.getResultOnlyMsg("User id is " + id);
    }

}
